1. Field of the Invention
This invention relates to providing processors with fast memory access and, more particularly, to providing control of cache memory systems.
2. Description of the Related Art
Processors often employ memories which are relatively slow when compared to the clock speeds of the processors. To speed up memory access for such processors, a relatively small amount of fast memory can be used in a data cache.
A cache can mediate memory accesses and lessen the average memory access time for all or a large portion of the address space of a processor even though the cache is small relative to the address space. Caches do not occupy a specific portion of the address space of the processor but instead include tag information which identifies addresses for information in lines of the cache.
Typically, a cache compares an address received from a processor to tag information stored in the cache to determine whether the cache contains a valid entry for the memory address being accessed. If such a cache entry exists (i.e. if there is a cache hit), the processor accesses (reads from or writes to) the faster cache memory instead of the slower memory. In addition to tag information, a cache entry typically contains a "validity" bit and a "dirty" bit which respectively indicated whether the associated information in the entry is valid and whether the associated information contains changes to be written back to the slower memory. If there is no cache entry for the address being accessed (i.e. there is a cache miss), access to the slower memory is required for the cache to create a new entry for the just accessed memory address.
Caches use cache policies such as "least recently used" or "not last used" replacement techniques to determine which existing entries are replaced with new entries. Typically, computer programs access the same memory addresses repeatedly. Therefore, the most recently accessed data is likely to be accessed again soon after the initial access. Because recently accessed data is available in the cache for subsequent accesses, caches can improve access time across the address space of the processor.
A different method for increasing processor speed is the use of parallel processing techniques. For example, by providing a number of functional units which perform different tasks, a "very long instruction word" (VLIW) processor can perform multiple functions through a single instruction. Also, a general purpose processor and a vector processor may be integrated to operate in parallel. An integrated multiprocessor is able to achieve high performance with low cost since the two processors perform only tasks ideally suited for each processor. For example, the general purpose processor runs a real time operating system and performs overall system management while the vector processor is used to perform parallel calculations using data structures called "vectors". (A vector is a collection of data elements typically of the same type.) Multiprocessor configurations are especially advantageous for operations involving digital signal processing such as coding and decoding video, audio, and communications data.